package test.stack;

import java.util.ArrayList;
import java.util.List;

public class Stack {

	private List list = new ArrayList();

	public Object top() {
		return (list.size() == 0 ? null : list.get(list.size() - 1));
	}

	public void add(Object obj) {
		list.add(obj);
	}
}
